package com.cp.order.utils;

import javax.servlet.http.HttpServletRequest;

import com.cp.order.model.SysUser;
import com.jfinal.core.Controller;

public class IWebUtils {

	/**
	 * 获取系统用户
	 */
	public static SysUser getCurrentSysUser(HttpServletRequest httpServletRequest) {
		SysUser admin = (SysUser) httpServletRequest.getSession().getAttribute("userSession");
		return admin;
	}

	public static SysUser getCurrentSysUser(Controller controller) {
		SysUser admin = (SysUser) controller.getRequest().getSession().getAttribute("userSession");
		return admin;
	}

}
